home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: System Software / Dev.CD Jul 96 SSW.toast / What's New? / Sample Code / Snippets Update / Sound / SndPlayDoubleBuffer / _headers / MungeBuffer.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-06  |  1.7 KB  |  58 lines  |  [TEXT/CWIE]

  1. /*
  2. **    Apple Macintosh Developer Technical Support
  3. **
  4. **    Headers for routines demonstrating how to manipulate buffers containing WAVE sounds.
  5. **
  6. **    by Mark Cookson, Apple Developer Technical Support
  7. **
  8. **    File:    MungeBuffer.h
  9. **
  10. **    Copyright ©1996 Apple Computer, Inc.
  11. **    All rights reserved.
  12. **
  13. **    You may incorporate this sample code into your applications without
  14. **    restriction, though the sample code has been provided "AS IS" and the
  15. **    responsibility for its operation is 100% yours.  However, what you are
  16. **    not permitted to do is to redistribute the source as "Apple Sample
  17. **    Code" after having made changes. If you're going to re-distribute the
  18. **    source, we require that you make it clear in the source that the code
  19. **    was descended from Apple Sample Code, but that you've made changes.
  20. */
  21.  
  22. #ifndef __MUNGEBUFFER__
  23. #define __MUNGEBUFFER__
  24.  
  25. #include <Types.h>
  26.  
  27. #ifndef __DEFINES__
  28. #include "Defines.h"
  29. #endif
  30.  
  31. /* Comment out the next line to use C functions instead of assembly functions. */
  32. #define ASM
  33.  
  34. #ifdef ASM
  35.  
  36. asm    void    EndianMono16BitBuffer        (Ptr buf,
  37.                                         unsigned long count);
  38. asm    void    EndianStereo8BitBuffer        (Ptr buf,
  39.                                         unsigned long count);
  40. asm    void    EndianStereo16BitBuffer        (Ptr buf,
  41.                                         unsigned long count);
  42. #else
  43.  
  44.     void    EndianMono16BitBuffer        (Ptr buf,
  45.                                         unsigned long count);
  46.     void    EndianStereo8BitBuffer        (Ptr buf,
  47.                                         unsigned long count);
  48.     void    EndianStereo16BitBuffer        (Ptr buf,
  49.                                         unsigned long count);
  50.  
  51. #endif
  52.  
  53. void ReverseMono8BitBuffer (const Ptr buf, unsigned long count);
  54. void ReverseStereo8BitBuffer (const Ptr buf, unsigned long count);
  55. void ReverseMono16BitBuffer (const Ptr buf, unsigned long count);
  56. void ReverseStereo16BitBuffer (const Ptr buf, unsigned long count);
  57.  
  58. #endif